<!--
 * @Author: your name
 * @Date: 2021-08-12 14:40:58
 * @LastEditTime: 2021-08-13 11:26:57
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \练习\float.htm
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>浮动布局</title>
    <style>
        html{
            font: 12px '微软雅黑';
        }
        body{
            margin: 0;
        }
        ul{
            margin: 0;padding: 0; list-style: none;
        }
        .wapper{
            width: 1080px;
            margin:0 auto;
        }
        .xpsf{
            background-color:rgb(56, 204, 36);
        }
        .xpsf ul.p_list{

        }
        .xpsf ul.p_list::after{
            content: "";
            display: block;
            clear: both;
        }
        .xpsf ul.p_list > li{
            height: 100px;
        }
        .xpsf ul.p_list > li:nth-child(1){
            width: 100px;
            background-color: rgb(209, 31, 135);
            float: left;
        }
        .xpsf ul.p_list > li:nth-child(2){
            width: 100px;
            background-color: burlywood;
            float: left;
        }
        .xpsf ul.p_list > li:nth-child(3){
            width: 100px;
            float: left;
            background-color: chartreuse;
        }
        .xpsf ul.p_list > li:nth-child(4){
            width: 100px;
            float: left;
            background-color: darkblue;
        }


        .rqtj{
            background-color: brown;
            height: 300px;
        }
        .jjsh{
            background-color: aquamarine;
            height: 300px;

        }
    </style>
</head>

<body>
    <!-- 容器 -->
    <div class="container">
        <!-- 新品首发 -->
        <div class="xpsf">
            <!-- 居中 -->
            <div class="wrapper">
                <ul class="p_list">
                    <li>1</li>
                    <li>2</li>
                    <li>3</li>
                    <li>4</li>
                </ul>
            </div>
        </div>
        <!-- 人气推荐 -->
        <div class="rqtj">
            <div class="wrapper">
                人气推荐
            </div>
        </div>
        <!-- 居家生活 -->
        <div class="jjsh">
            <div class="wrapper">
                居家生活
            </div>
        </div>
    </div>
</body>
</html>